﻿<Window x:Class="BlueRadar.UI.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Name="Window"
	Title="MainWindow" AllowsTransparency="True" Background="{x:Null}" WindowStyle="None"
	Width="640" Height="480" WindowStartupLocation="CenterScreen" mc:Ignorable="d" Icon="/Blue%20Radar;component/Bluetooth-Icon.ico">
    <Window.Resources>
        <Storyboard x:Key="OnClick">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-90"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="-120"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="-150"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="-180"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="-210"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-240"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="-270"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="-300"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="-330"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="-360"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="-390"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="-420"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="-450"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-0.078"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="-15.156"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="-56.36"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="-112.625"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="-168.922"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-210.109"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="-225.188"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="-210.11"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="-168.938"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="-112.641"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="-56.36"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="-15.171"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="-0.063"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-0.094"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="-56.344"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="-97.562"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="-112.624"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="-97.531"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-56.344"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="-0.125"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="56.219"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="97.421"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="112.468"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="97.39"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="56.203"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="-0.078"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="InfoOnMouseEnter">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btn_info" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="37"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="47"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btn_info" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="38"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="48"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="InfoMouseLeave">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btn_info" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="47"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="37"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btn_info" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="48"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="38"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        
        <Storyboard x:Key="SettingsOnMouseEnter">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btn_settings" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="37"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="47"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btn_settings" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="38"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="48"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="SettingsMouseLeave">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btn_settings" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="47"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="37"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btn_settings" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="48"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="38"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        
        
        <Storyboard x:Key="SearchOnMouseEnter">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="search_btn" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="36"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="46"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="search_btn" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="38"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="48"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="SearchMouseLeave">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="search_btn" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="45"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="35"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="search_btn" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="45"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="35"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="CloseMouseEnter">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="close_btn" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="38"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="48"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="close_btn" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="38"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="48"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="CloseMouseLeave">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="close_btn" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="48"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="38"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="close_btn" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="48"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="38"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="btn_settings">
            <BeginStoryboard x:Name="SettingsOnMouseEnter_BeginStoryboard" Storyboard="{StaticResource SettingsOnMouseEnter}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="btn_settings">
            <BeginStoryboard x:Name="SettingsMouseLeave_BeginStoryboard" Storyboard="{StaticResource SettingsMouseLeave}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="btn_info">
            <BeginStoryboard x:Name="InfoOnMouseEnter_BeginStoryboard" Storyboard="{StaticResource InfoOnMouseEnter}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="btn_info">
            <BeginStoryboard x:Name="InfoMouseLeave_BeginStoryboard" Storyboard="{StaticResource InfoMouseLeave}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="search_btn">
            <BeginStoryboard x:Name="SearchOnMouseEnter_BeginStoryboard" Storyboard="{StaticResource SearchOnMouseEnter}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="search_btn">
            <BeginStoryboard x:Name="SearchMouseLeave_BeginStoryboard" Storyboard="{StaticResource SearchMouseLeave}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="close_btn">
            <BeginStoryboard x:Name="CloseMouseEnter_BeginStoryboard" Storyboard="{StaticResource CloseMouseEnter}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="close_btn">
            <BeginStoryboard x:Name="CloseMouseLeave_BeginStoryboard" Storyboard="{StaticResource CloseMouseLeave}"/>
        </EventTrigger>        
        <EventTrigger RoutedEvent="Mouse.MouseDown" SourceName="search_btn">
            <BeginStoryboard x:Name="OnClick_BeginStoryboard" Storyboard="{StaticResource OnClick}" />
        </EventTrigger>
    </Window.Triggers>
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="160"/>
        </Grid.ColumnDefinitions>
        <Canvas x:Name="RadarGrid" Margin="15">
            <Ellipse x:Name="ellipse6" Width="1" Height="1" Stroke="Red" Canvas.Left="224.5" Canvas.Top="224.5" d:LayoutOverrides="Width, Height" >
                <Ellipse.Effect>
                    <DropShadowEffect/>
                </Ellipse.Effect>
            </Ellipse>
            <Ellipse x:Name="ellipse" Width="450" Height="450" Stroke="Black" d:LayoutOverrides="Width, Height, Margin" PreviewMouseDown="Drag" Cursor="SizeAll">
                <Ellipse.Effect>
                    <DropShadowEffect/>
                </Ellipse.Effect>
                <Ellipse.Fill>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF003AFF" Offset="0"/>
                        <GradientStop Color="#3F223474" Offset="1"/>
                    </LinearGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <Ellipse x:Name="ellipse2" Width="350" Height="350" Stroke="Black" Canvas.Left="50" Canvas.Top="50" d:LayoutOverrides="Width, Height" />
            <Ellipse x:Name="ellipse3" Width="250" Height="250" Stroke="Black" Canvas.Left="100" Canvas.Top="100" d:LayoutOverrides="Width, Height" />
            <Ellipse x:Name="ellipse4" Width="150" Height="150" Stroke="Black" Canvas.Left="150" Canvas.Top="150" d:LayoutOverrides="Width, Height" />
            <Ellipse x:Name="ellipse5" Width="50" Height="50" Stroke="Black" Canvas.Left="200" Canvas.Top="200" d:LayoutOverrides="Width, Height" />
        </Canvas>
        <Grid x:Name="Scanner" HorizontalAlignment="Right" Margin="0,127.568,92.864,127.371" Width="69">
            <Path Visibility="Hidden" x:Name="path" Data="M 300 100 L 500 400 100 400 Z"
				StrokeThickness="0" 
				StrokeLineJoin="Round" 
				Stretch="Fill" RenderTransformOrigin="0.5,0.5" >
                <Path.OpacityMask>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="Black" Offset="0"/>
                        <GradientStop Color="#FFB32323" Offset="1"/>
                    </LinearGradientBrush>
                </Path.OpacityMask>
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="-90"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.946,0.629" StartPoint="0.039,0.647">
                        <GradientStop Color="#FF00B0FF" Offset="1"/>
                        <GradientStop Color="#19FFFFFF"/>
                    </LinearGradientBrush>
                </Path.Fill>

            </Path>
        </Grid>
        <Grid Background="Black" Grid.Column="1" HorizontalAlignment="Left" Margin="13,94,0,0" Name="GridDetails" Width="147" ShowGridLines="False" Visibility="Hidden" Height="347" VerticalAlignment="Top">
            <Grid.Effect>
                <DropShadowEffect/>
            </Grid.Effect>
            <Grid.RowDefinitions>
                <RowDefinition Height="25*" />
                <RowDefinition Height="322*" />
            </Grid.RowDefinitions>
            <ListBox Height="282" HorizontalAlignment="Left" Margin="3,5,0,0" Name="DeviceDetailsList" VerticalAlignment="Top" Width="141" Grid.Row="1">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <WrapPanel Orientation="Vertical">
                            <Label Content="Name" FontWeight="Bold" />
                            <TextBlock Text="{Binding Name}" />
                            <Label Content="Type" FontWeight="Bold" />
                            <TextBlock Text="{Binding MajorDevice}" />
                            <Label Content="Services Installed" FontWeight="Bold" />
                            <ComboBox ItemsSource="{Binding Services}" SelectedIndex="0"/>
                            <Label Content="Authenticated" FontWeight="Bold" />
                            <TextBlock Text="{Binding Authenticated}" />
                            <Label Content="Device Address" FontWeight="Bold" />
                            <TextBlock Text="{Binding DeviceAddressString}" />
                            <Label Content="Send Status" FontWeight="Bold" />
                            <TextBlock Text="{Binding LastSendStatus}" />
                        </WrapPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <Label Foreground="White" FontWeight="Bold" Content="Device Details" Margin="6,0,12,313" Name="label1" HorizontalAlignment="Center" Grid.RowSpan="2" />
            <Button Content="Send File" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="78,292,0,0" Name="btn_send" VerticalAlignment="Top" Width="63" Click="btn_send_Click" />
            <Button Content="Browse" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="5,292,0,0" Name="btn_browse" VerticalAlignment="Top" Width="66" Click="btn_browse_Click" />
        </Grid>
        <Grid x:Name="ControlGrid" Margin="411,8,8,0" VerticalAlignment="Top" Height="69" RenderTransformOrigin="0.5,0.5" Grid.ColumnSpan="2">
            <Image x:Name="search_btn" Margin="0,7,155,0" VerticalAlignment="Top" Height="36" Source="Images\SearchBtn.png" Cursor="Hand" MouseDown="search_btn_MouseDown" Width="38" HorizontalAlignment="Right" d:LayoutOverrides="Width" RenderTransformOrigin="0.5,0.5">
                <Image.Effect>
                    <DropShadowEffect />
                </Image.Effect>
            </Image>
            <Image x:Name="close_btn" Margin="0,6,6,0" VerticalAlignment="Top" Height="37" Source="Images\CloseBtn.png" Cursor="Hand" Width="36" MouseDown="close_btn_MouseDown" HorizontalAlignment="Right">
                <Image.Effect>
                    <DropShadowEffect />
                </Image.Effect>
            </Image>
            <Image Cursor="Hand" Height="37" HorizontalAlignment="Right" IsEnabled="True" Margin="0,6,106,0" Name="btn_settings" RenderTransformOrigin="0.5,0.5" Source="Images\Settings.png" VerticalAlignment="Top" Width="38" MouseDown="btn_settings_MouseDown">               
                <Image.Effect>
                    <DropShadowEffect />
                </Image.Effect>
            </Image>
            <Image Cursor="Hand" Height="37" HorizontalAlignment="Right" Margin="0,6,54,0" Name="btn_info" RenderTransformOrigin="0.5,0.5" Source="Images\info-icon.png" VerticalAlignment="Top" Width="38" MouseDown="btn_info_MouseDown">
                <Image.Effect>
                    <DropShadowEffect />
                </Image.Effect>
            </Image>
        </Grid>
    </Grid>
</Window>